package com.property.manage.dao.parking;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.property.manage.model.parking.ParkingRentArrearsVo;
import com.property.manage.model.parking.ParkingRentEntity;
import com.property.manage.model.parking.ParkingRentPayVo;
import com.property.manage.model.parking.ParkingRentVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.time.LocalDateTime;
import java.util.List;

/**
 * 描述
 *
 * @author lwb
 * @since 2020/9/11
 */
@Repository
public interface ParkingRentMapper extends BaseMapper<ParkingRentEntity> {

    IPage<ParkingRentVo> page(@Param("page") Page<ParkingRentVo> page, @Param("villageId") Integer villageId, @Param("building") Integer building,
                              @Param("unit") Integer unit, @Param("roomNumber") String roomNumber);

    List<ParkingRentEntity> getByVillageId( @Param("villageId") Integer villageId);

    IPage<ParkingRentPayVo> payPage(@Param("page") Page<ParkingRentPayVo> page, @Param("villageId") Integer villageId, @Param("building") Integer building,
                                    @Param("unit") Integer unit, @Param("roomNumber") String roomNumber, @Param("startTime") LocalDateTime startTime, @Param("endTime") LocalDateTime endTime);


    ParkingRentPayVo payVo(@Param("id") Integer id);
}
